import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      // 配置别名
      "@": resolve(__dirname, "./src"),
    },
  },
  server: {
    proxy: {
      "/app-apis": {
        target: "http://zsjyyds.online:9000/",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/app-apis/, ""),
      },
    },
  },
});
